{% extends 'TopxiaAdminBundle::layout.html.twig' %}

{% set menu = 'admin_cloud_bill' %}

{% block main %}

  <table class="table table-hover" id="bill-table">
    <tr>
      <th>{{'账单月份'|trans}}</th>
      <th>{{'空间使用量'|trans}}</th>
      <th>{{'流量'|trans}}</th>
      <th>{{'空间费用'|trans}}</th>
      <th>{{'流量费用'|trans}}</th>
      <th>{{'费用合计'|trans}}</th>
    </tr>
    {% for bill in bills %}
    <tr>
      <td>{{ bill.date }}</td>
      <td>
        {{'月末：'|trans}}{{ bill.space }}G <br> {{'月均：'|trans}} {{ bill.spaceAvg }}G
        <br><small class="text-muted">{{'免费额度：'|trans}}{{ bill.spaceGift }}G</small>
      </td>
      <td>
        {{ bill.transfer }}G
        <br><small class="text-muted">{{'免费额度：'|trans}}{{ bill.transferGift }}G/{{'月'|trans}}</small>
      </td>
      <td>
        {{ bill.spaceFee }}{{'元'|trans}}
        <br><small class="text-muted">({{'单价：'|trans}}{{ bill.spacePrice }}{{'元'|trans}}/G)</small>
      </td>
      <td>
        {{ bill.transferFee }}{{'元'|trans}}
        <br><small class="text-muted">({{'单价：'|trans}}{{ bill.transferPrice }}{{'元'|trans}}/G)</small>
      </td>
      <td><strong class="text-success">{{ bill.totalFee }}{{'元'|trans}}</strong></td>
    </tr>
    {% else %}
      <tr><td colspan="20"><div class="empty">{{'暂无账单记录'|trans}}</div></td></tr>
    {% endfor %}
  </table>

  <div class="alert alert-info">
    {{'空间费用 = 月均空间使用量 * 空间单价'|trans}}
  </div>

{% endblock %}